﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SelElectCalcModernUI.Lib
{
    public static class IEnumerableHelper
    {
        public static Queue<T> ToQueue<T>(this IEnumerable<T> items)
        {
            if (items != null)
            {
                Queue<T> res = new Queue<T>();
                foreach (var item in items)
                {
                    res.Enqueue(item);
                }
                return res;
            }
            else
                return null;
        }
    }
}
